<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ include file="./nav.jsp" %>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <img src="/img/stars.jpg" alt="..." class="note-img">
        </div>
        <div class="col-md-10 col-md-offset-1 note-type">
            ${select}

        </div>


    </div>
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="top-line">搜索结果</div>
                <c:forEach items="${notes.data}" var="tn">
                    <div class="note-style">
                        <div style="float: left;margin-left: 20px">
                            <a href="${pageContext.request.contextPath}/api/note/note?noteid=${tn.noteId}"
                               style="text-decoration: none;">
                                <h2>${tn.tittle}</h2>
                            </a>
                        </div>
                        <c:if test="${tn.good==true}">
                            <div class="note-good" style="color: #5cb85c;">精华帖</div>
                        </c:if>
                        <c:if test="${tn.top==true}">
                            <div class="note-good" style="color: #d17d22;">置顶帖</div>
                        </c:if>

                        <div style="float: right;margin-right: 20px;font-size: 20px">${tn.author.nickname}</div>
                    </div>
                </c:forEach>
            <div id="Paginator" style="text-align: center"> <ul id="pageLimit"></ul> </div>







        </div>
    </div>

</div>
<script type="text/javascript">
    $('#pageLimit').bootstrapPaginator({
        currentPage: ${notes.data.page},
        totalPages: ${notes.data.maxPage},
        size:"normal",
        bootstrapMajorVersion: 3,
        alignment:"right",
        <%--numberOfPages:${notes.data},--%>
        itemTexts: function (type, page, current) {
            switch (type) {
                case "first": return "首页";
                case "prev": return "上一页";
                case "next": return "下一页";
                case "last": return "末页";
                case "page": return page;
            }
        }
    });

</script>
</body>
</html>
